#pragma once

#include <memory>

#include "file_system/file_writer/normal_file_writer.h"
#include "util/hashmap/hash_map.h"
#include "util/status.h"

namespace hawking {
namespace indexlib {

template <typename Key>
class PrimaryKeyFileWriter {
public:
    PrimaryKeyFileWriter() {}
    virtual ~PrimaryKeyFileWriter() {}

    virtual void Init(
        size_t pk_count, std::shared_ptr<NormalFileWriter> file, Pool* pool) = 0;
    virtual Status AddPKPair(Key key, uint64_t docid) = 0;
    virtual Status AddSortedPKPair(Key key, uint64_t docid) = 0;
    virtual Status Close() = 0;
};

}
}